package com.gancai.admin.feign;

import com.gancai.admin.feign.fallback.TestFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


/**
 * @author GanGan
 */

//value要调用的服务名，fallback兜底返回配置
@FeignClient(value = "service-admin",fallback = TestFeignClientFallback.class)
public interface TestFeignClient {

    @GetMapping("/test/{id}")
    String getTestString(@PathVariable("id") Long id);//@PathVariable获取路径上的参数

}
